package com.mxl;

import java.util.Calendar;
import java.util.Date;

public class Test {
    public static void main(String[] args) throws Exception{
        long time = new Date().getTime();
        System.out.println(new Date().getTime() == System.currentTimeMillis());

        Integer index = null;
        if(index == 0){
            System.out.println("index==0");
        }

    }


    /**
     * 得到转换后的卡id
     *
     * @param cardId     :卡id
     * @param searchType : 1:需要16进字转换，不传不需要，2: 为16进制截取不需要转换
     * @return
     */
    private static String getCardIdBySearchType(String cardId, Integer searchType) {
        if (null != searchType && searchType == 1) {// 截取字符串并将16进制转10进制
            // 获取8-16位卡号
            cardId = cardId.substring(8, 16);
            // 将16进制卡号转为10进制
//            cardId = StringUtil.getHexToIntString(cardId, 10);
        }
        if (null != searchType && searchType == 2) {// 截取字符串不需要转转
            // 获取6-14位卡号
            cardId = cardId.substring(6, 14);
        }
        return cardId;
    }
    

    public static int getDayofWeek(Date date1) throws Exception {
        Calendar cld = Calendar.getInstance();
        cld.setTime(date1);
        int dayOfSunday = cld.get(7);
        return dayOfSunday;
    }


}
